package com.cory.boot.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;

/**
 * spring boot 启动监听类 ApplicationStartedEvent：spring boot启动开始时执行的事件
 */
@Slf4j
public class ApplicationStartedEventListener implements ApplicationListener<ApplicationStartedEvent> {

    @Override
    public void onApplicationEvent(ApplicationStartedEvent event) {
        // SpringApplication app=event.getSpringApplication();
        // app.setShowBanner(false);// 不显示banner信息
        log.info("==" + this.getClass().getName() + "==");
    }

}
